Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Nov 6, 2025

The selector needs to be compared in a lowercase manner. This also almost completely obsoletes the interned string optimization, so get rid of that for simplicity sake. While there is still theoretical benefit, it is only 1-2% in my random tests, not worth it anymore.

@ndossche
Copy link
Member Author

I ported some extra wpt tests to my wpt repo to test the behaviour and it seems fine.

…querySelectorAll requires elements in $selectors to be lowercase

The selector needs to be compared in a lowercase manner.
This also almost completely obsoletes the interned string optimization,
so get rid of that for simplicity sake. While there is still theoretical
benefit, it is only 1-2% in my random tests, not worth it anymore.
@ndossche ndossche merged commit 3ad5799 into php:PHP-8.4 Nov 12, 2025
10 checks passed
ndossche added a commit that referenced this pull request Nov 12, 2025
* PHP-8.4:
  Fix GH-20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase (#20409)
ndossche added a commit that referenced this pull request Nov 12, 2025
* PHP-8.5:
  Fix GH-20395: \Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase (#20409)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

\Dom\ParentNode::querySelector and \Dom\ParentNode::querySelectorAll requires elements in $selectors to be lowercase

3 participants